<?php

include_once dirname(dirname(__FILE__)) . '/include/common.php';
$page = isset($_POST["page"]) ? $_POST["page"] : 1;
$core = new core();

$load_more = 0;
$product_images = $core->getListProductImage($page, $load_more, 25);
if ($product_images) {
    $html = '';
    foreach ($product_images as $product) {
        $html.='<li class="thumbnail" >
                    <a href="javascript:void(0)" rel="' . $product->product_code . '"   class="cboxElement act_chooes_img"><img  src="photo/thumb_photo/200_' . $product->main_photo . '"  style="display: block;"></a>
                </li>';
    }
    echo json_encode(array('type' => 0, 'html' => $html,
        'load_more'=>$load_more,'page'=>$page+1
    ));
    die;
} else {
    echo json_encode(array('type' => 1, 'msg' => "Không có ảnh sản phẩm!"));
    die;
}
?>